From: Florian Müllner Date: Wed, 11 Aug 2021 21:54:30 +0000 (+0200) Subject: appMenu: Do launch animation if supported by source X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~107 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c809a874124053a19b2640daa0da5cdc5416cba8;p=gnome-shell.git appMenu: Do launch animation if supported by source Likewise any launch actions should animate the corresponding launcher (if the menu is associated with a launcher). Part-of: --- diff --git a/js/ui/appMenu.js b/js/ui/appMenu.js index 3b757492e..f1256f7c4 100644 --- a/js/ui/appMenu.js +++ b/js/ui/appMenu.js @@ -38,6 +38,7 @@ var AppMenu = class AppMenu extends PopupMenu.PopupMenu { this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); this._newWindowItem = this.addAction(_('New Window'), () => { + this._animateLaunch(); this._app.open_new_window(-1); Main.overview.hide(); }); @@ -79,6 +80,11 @@ var AppMenu = class AppMenu extends PopupMenu.PopupMenu { this._detailsItem.visible = sw !== null; } + _animateLaunch() { + if (this.sourceActor.animateLaunch) + this.sourceActor.animateLaunch(); + } + /** */ destroy() { super.destroy(); @@ -126,6 +132,9 @@ var AppMenu = class AppMenu extends PopupMenu.PopupMenu { actions.forEach(action => { const label = appInfo.get_action_name(action); this._actionSection.addAction(label, event => { + if (action === 'new-window') + this._animateLaunch(); + this._app.launch_action(action, event.get_time(), -1); Main.overview.hide(); });